package cn.taoticket.client;

import cn.taoticket.pojo.TaoticketImage;

import cn.taoticket.fallback.TaoticketImageClientFallBack;

import java.util.List;
import java.util.Map;

import cn.taoticket.config.TaoTicketConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(name = "taoticket-base-provider", configuration = TaoTicketConfiguration.class, fallback = TaoticketImageClientFallBack.class)
public interface RestTaoticketImageClient {

    @RequestMapping(value = "/getTaoticketImageById", method = RequestMethod.POST)
    public TaoticketImage getTaoticketImageById(@RequestParam("id") Long id) throws Exception;

    @RequestMapping(value = "/getTaoticketImageListByMap", method = RequestMethod.POST)
    public List<TaoticketImage> getTaoticketImageListByMap(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getTaoticketImageCountByMap", method = RequestMethod.POST)
    public Integer getTaoticketImageCountByMap(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/qdtxAddTaoticketImage", method = RequestMethod.POST)
    public Integer qdtxAddTaoticketImage(@RequestBody TaoticketImage taoticketImage) throws Exception;

    @RequestMapping(value = "/qdtxModifyTaoticketImage", method = RequestMethod.POST)
    public Integer qdtxModifyTaoticketImage(@RequestBody TaoticketImage taoticketImage) throws Exception;

    @RequestMapping(value = "queryImageList", method = RequestMethod.POST)
    public List<TaoticketImage> queryImageList(@RequestParam("targetId") Long targetId,
                                               @RequestParam("type") Integer type,
                                               @RequestParam("category") Integer category) throws Exception;
}


